#ifndef LISTFORMITEM_H
#define LISTFORMITEM_H

#include <QUrl>
#include <QWidget>
#include <QObject>

class listFormitem
{
public:
    listFormitem();

    listFormitem(QUrl url);

    //解析媒体数据
    void praseMusicitem(QUrl url);

    //向数据库插入数据项
    void insertMusicFromE();

    //获取数据源
    void setitemId(const QString &itemid);
    void setNameitem(const QString &name);
    void setAuthoritem(const QString &author);
    void setAlbumitem(const QString &album);
    void setDurationitem(const qint64 &duration);
    void setisLikeitem(bool isLike);
    void setisHistoryitem(bool isHistory);
    void setUrlitem(const QUrl &itemurl);

    QString getitemId() const;
    QString getNameitem() const;
    QString getAuthoritem() const;
    QString getAlbumitem() const;
    qint64 getDurationitem() const;
    bool getisLikeitem() const;
    bool getisHistoryitem() const;
    QUrl getUrlitem() const;
    QString getLrcPath();
private:
    //确保唯一id
    QString itemid;
    QString name;
    QString author;
    QString album;
    qint64 duration;
    bool isLike;
    bool isHistory;
    QUrl itemurl;
};

#endif // LISTFORMITEM_H
